<?php
class CategoryModel extends RelationModel{
	/**
	 * 定义关联关系
	 */
	public $_link = array(
		'Section' => array(
			'mapping_type' => BELONGS_TO,
			'class_name' => 'Section',
			'foreign_key' => 'sectionid',
			'mapping_name' => 'sections',
			//'as_fields' => 'title:sec_title,description:desc',
			
		),
		'Article' => array(
			'mapping_type' => HAS_MANY,
			'class_name' => 'Article',
			'foreign_key' => 'catid',
			'mapping_name' => 'articles',
		),
	);
		
		
}
?>